/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package VO;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author HELIOS
 */
@Embeddable
public class CAreaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idArea", nullable = false)
    private int idArea;
    @Basic(optional = false)
    @Column(name = "idFacultad", nullable = false)
    private int idFacultad;

    public CAreaPK() {
    }

    public CAreaPK(int idArea, int idFacultad) {
        this.idArea = idArea;
        this.idFacultad = idFacultad;
    }

    public int getIdArea() {
        return idArea;
    }

    public void setIdArea(int idArea) {
        this.idArea = idArea;
    }

    public int getIdFacultad() {
        return idFacultad;
    }

    public void setIdFacultad(int idFacultad) {
        this.idFacultad = idFacultad;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idArea;
        hash += (int) idFacultad;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CAreaPK)) {
            return false;
        }
        CAreaPK other = (CAreaPK) object;
        if (this.idArea != other.idArea) {
            return false;
        }
        if (this.idFacultad != other.idFacultad) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "fundacionprofesores.CAreaPK[ idArea=" + idArea + ", idFacultad=" + idFacultad + " ]";
    }
    
}
